from bokeh.plotting import figure, show
from bokeh.io import output_notebook

# 在 Jupyter Notebook 中显示图表
output_notebook()

# 创建数据
x = [1, 2, 3, 4, 5]
y = [6, 7, 2, 4, 5]

# 创建图表
p = figure(title="Interactive Plot", x_axis_label='x', y_axis_label='y', tools="pan,box_zoom,wheel_zoom,reset,hover")

# 添加折线
p.line(x, y, legend_label="Line", line_width=2)

# 添加散点
p.circle(x, y, size=10, color="navy", alpha=0.5)

# 显示图表
show(p)